package com.geotmt.billingcenter.modules.link.service.impl;

import com.geotmt.billingcenter.modules.link.mapper.LinkMapper;
import com.geotmt.billingcenter.modules.link.service.LinkService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description 类描述
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/4/16 18:04
 * @Version     v1
 **/
@Service
public class LinkServiceImpl implements LinkService {

    private static final Logger logger = LoggerFactory.getLogger(LinkServiceImpl.class);

    @Resource
    private LinkMapper linkMapper;

    @Override
    public Integer getInterfaceIdByType(String type) {
        logger.info("根据接口类型查询接口id(内部) Service");
        return linkMapper.getInterfaceIdByType(type);
    }

    @Override
    public Integer getOutInterfaceIdByType(String type) {
        logger.info("根据接口类型查询接口id(外部) Service");
        return linkMapper.getOutInterfaceIdByType(type);
    }

    @Override
    public Integer getDsIdByIfType(String type) {
        logger.info("根据外部接口查询数据源id Service");
        return linkMapper.getDsIdByIfType(type);
    }
}
